package com.example.entry;

import java.util.Map;
/**
 * @author:我叫程晓非
 * @desc:设备Entry类
 * @date:2021-11-08
 * @version:1.0
 */
public class DeviceEntry<K,V> implements Map.Entry {

    private Object key;
    private Object value;

    public DeviceEntry(K key,V value){
        this.key = key;
        this.value = value;
    }

    @Override
    public Object getKey() {
        return this.key;
    }

    @Override
    public Object getValue() {
        return this.value;
    }

    @Override
    public Object setValue(Object value) {
        Object oldValue = this.value;
        this.value = value;
        return oldValue;
    }

    @Override
    public String toString(){
        return "["+this.value.toString()+"]";
    }
}
